import axios from "@/libs/api.request";

export const login = ({
  userName,
  password
}) => {
  const data = {
    loginName: userName,
    pwd: password
  };
  return axios.request({
    url: "/UserLogin/Login",
    data,
    method: "post"
  });
};

export const getUserInfo = (token) => {
  return axios.request({
    url: "get_info",
    params: {
      token
    },
    method: "get"
  });
};

export const logout = (token) => {
  return axios.request({
    url: "logout",
    method: "post"
  });
};
